﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;

namespace ExaminationSys.ashx
{
    /// <summary>
    /// StudentSignOutHandler 的摘要说明
    /// </summary>
    public class StudentSignOutHandler : IHttpHandler, IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Session["StudentInfo"] = null;

            var cookie = context.Request.Cookies["SJEDU_UID"]; 
            cookie.Expires=DateTime.Today.AddDays(-1); 
            context.Response.Cookies.Add(cookie);
            context.Response.Write("200");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}